<html>
    <head>
        <title>Welcome to CScrum</title>
		<meta name="layout" content="main" />
		<g:javascript library="jquery"/>
		<script>
			$(function(){
				$("#projectSelect").change(function(){
					submitButton.click();
				});
			});
		</script>
    </head>
    
    <body>
        <h1 style="margin-left:20px;">Welcome to CScrum</h1>
        <p style="margin-left:20px;width:80%">Welcome CScrum. Your only OSS Scrum Project Manager</p>
        
        <div class="dialog" style="margin-left:20px;width:60%;">
             <g:formRemote name="projectRemoteForm" id="projectRemoteForm" url="[controller:'sprint',action:'findByProjectId']" update="sprintsDiv" >
              Select project
              <g:select name="projectId" from="${org.cscarioni.Project.list()}" optionKey="id" id="projectSelect" noSelection="['':'-Choose-']"/>
              <input id="submitButton" type="submit" style="display: none;"/>
             </g:formRemote>                
             <div id="sprintsDiv">
             </div> 
        </div>
    </body>
</html>